<?php ob_start(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
  <title>Bios information system</title>
<script language="JavaScript" src="km.js"></script>
<link type="text/css" rel="stylesheet" href="calendar.css" media="screen"></link>

<SCRIPT type="text/javascript" src="calendar.js"></script>

<script type="text/javascript" charset="windows-1250">
<!--
window.name='BIOS';
//-->
</script>
<style>
.skryvany {display: none;}
a:link, a:visited {text-decoration: none; color: black;}

.dtcell {
  border-right-style: solid;
  border-left-style: solid;
  border-right-width: 1;
  border-left-width: 1;}
.cls_tr {
  padding: 2 0 2 0;
}
.cls_td {
  width: 206px;
  float: left;
}
.vyber {
  font: 14px sans-serif;
  #top: 300px;
  #left: 300px;
  width: 400px;
  height: 300px;
  position: absolute;
  border: 2px solid #ddd;
  border-color: black;
  background-color: white;
  margin: 0px;
  color: black;
  list-style-type: none;
  cursor: default;
  visibility: hidden;
  #-moz-opacity: 0.85;
}
</style>
</head>
<body>

<?php

include "athis.inc";
include "connectDB.php";
include "functions.php";

$rights = getRights($_SERVER["REMOTE_USER"]);
//$rights = getRights($_SERVER["REDIRECT_REMOTE_USER"]);
//echo "rigth: $rights";
//echo $_SERVER["REDIRECT_REMOTE_USER"];

?>

<table width="100%" height="100%" border="0" frame="void">
  <col width="140">
  <col width="10">
  <col width="*">

  <tr>
    <td width="140"  height="116"><img src="prouzek.jpg"></td>
    <td width="1062"  height="116">      <div align="left"><img src="logo.jpg" width="300" height="100" hspace="0" vspace="0" align="left" />
        <img src="bios.jpg" hspace="0" vspace="50" align="middle">    </div></td>
    <td width="12">&nbsp;</td>
  </tr>
  <tr>
    <td  height="5"><hr></td>
    <td  height="5" colspan="2" ><hr></td>
  </tr>
  <tr>
    <td height="*" align="left" valign="top">
<?php
    if ($rights <= 8)
    {
      if ($rights == 1)
      {
          /* mame prava pro administraci */
        include "admin.php";
      }

      //if ($_GET["type"] == "base")
      include "base.php";
    }

?>
    </td>
    <td height="*" colspan="2">

<?php
      if (isset($_GET["det"]))
      {
        if ($_GET["det"] == "pridat_zakazku")
          include "form_pridej_zakazku.php";

        if ($_GET["det"] == "pridat_podzakazku")
          include "form_pridej_podzakazku.php";

        if ($_GET["det"] == "dokoncit")
          include "dokonci.php";

        if ($_GET["det"] == "databaze_klientu")
          include "form_databaze_klientu.php";

        if ($_GET["det"] == "pridat_klienta")
          include "form_pridej_klienta.php";

        if ($_GET["det"] == "tiskz")
          include "form_zakazky_tisk.php";

        if ($_GET["det"] == "editz")
          include "form_zakazky_edit.php";

        if ($_GET["det"] == "pridat_kontakt")
          include "form_pridej_kontakt.php";

        if ($_GET["det"] == "prijate_zakazky")
          include "form_prijate_zakazky.php";

        if ($_GET["det"] == "zmeny")
          include "zmeny.php";

        if ($_GET["det"] == "plan")
          include "plan.php";

        if ($_GET["det"] == "tisk")
          include "tisk.php";

        if ($rights == 1)
        {
          if ($_GET["det"] == "del")
            include "admin/del.php";
        }
      }

?>

    </td>
  </tr>
</table>


<?php

include "disconnectDB.php";

?>

</body>
</html>
<?php ob_end_flush(); ?>

